// dlg.txt

//MK Edit
//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 60;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You enter a remote outpost, deep in the underworld. It is ... not what you expected.";
	text2 = "The air is fresh and warm. It smells of flowers and trees and freshly-cut grass. And that is what you see ahead. You are still deep underground, but some strange magic has created a little bit of the surface world down here.";
	text3 = "The only thing that is missing is birdsong, though a few bees fly about.";
	text4 = "You recognize this magic. You encountered it in Sacramentum. This is a refuge of the Nisse, the mischievous fairy folk.";
	text5 = "You heard rumors of places like this when you were in Sacramentum. This may be a refuge of the Nisse, the mischievous fairy folk.";
	code =
		sf(this_town,1,1);
		if (gf(97,0) > 0)
			rs(5);
			else rs(4);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "The corridor opens into an inn. There are tables and chairs, a counter, barrels of ale, stew on the fire. There is also the smell of freshly-cut wood. This is all new construction.";
	text2 = "There are other customers here, you think. Shades walk around you, fetching insubstantial drinks and imbibing them at their tables.";
	text3 = "A Nisse is watching you from behind the counter. She is a slight, humanlike figure with pale greenish skin. She has a wide, welcoming smile.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "To the north, you see a storeroom. There are massive piles of supplies. The Nisse came here with all the materials they need to expand. They don't want this to be their only outpost.";
	text2 = "As you enter, you feel a chill. The light dims. The reassuring smell of the garden fades. You can sense their anger at your intrusion.";
	code =
		erase_char(6003);
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "__";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "__";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode; // portal
	tag = 13;
	condition = 1;
	text1 = "A stone portal has been built here. You touch it.";
	text2 = "It is just cold stone. No enchantments have been placed upon it. Yet.";
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "At last, you break the shield around the Nisse leaders. They show no emotion. Their deaths are here, but they accept them.";
	text2 = "Candlesmoke says, _We will always outlast you, Haven. When your empire falls, we will be sure to feed on the survivors. That is our curse. We face our end, but the Nisse will torment you forever!_";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "You try to talk to the ghostly customer, but it doesn't respond. Its body is faint and fuzzy.";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "There is a ghostly servant sweeping up the corridor. You try to interact with it, but it doesn't respond.";
	text2 = "Interesting. Though it is mostly insubstantial, a silver key hangs from its belt. For a moment. When you look again, it vanishes a moment later.";
	code =
		if (gf(60,17) == 0)
			sf(60,17,1);
			else rs(2);
	break;
	

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "This jar is for the refuse of the inn. You find some bones. Some scraps of cloth. A broken plate. Nothing of value.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "This jar is for the refuse of the inn. It is empty. Nobody has ever slept here.";
	text2 = "As you turn away, you detect a glimmer of reflected light out of the corner of your eye. Someone has hidden a silver key behind the jar. You take it.";
	code =
		if (gf(60,17) == 1) {
			sf(60,17,2);
			set_spec_item(12,1);
			}
			else rs(2);
	break;
	
begintalknode;
	tag = 19;
	condition = 1;
	text1 = "The last of the three Nisse lords has fallen. Instantly, the magic that holds this place together begins to fail. The air grows cold. Panels start to fall off the walls. The smell of nature is replaced by the stench of rot.";
	text2 = "The strange Nisse have attempted to spread farther through Haven's lands. You managed to stop them. Here.";
	text3 = "Who knows where else these treacherous creatures will turn up? Or how much of their claimed power they actually hold?";
	
begintalknode;
	tag = 20;
	condition = 1;
	text1 = "The chest contains a leather backpack. It's brand new and really very nice. Much more stylish than what you have been using. You put it on. Comfortable! You eagerly transfer your goods to the new pack.";
	text2 = "The chest rebukes you with its emptiness.";
	code =
		if (gf(60,28) == 0) {
			sf(60,28,1);
			rs(2);
			set_spec_item(41,1);
			}
			else rs(1);
	break;
	
begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The Nisse leans against the counter and gives you a wide, welcoming smile. Her eyes have a wild, unpredictable look, but that's to be expected. At least she's friendly.";
	text2 = "_Welcome! Welcome, customer! You are one of the first to favor this refuge with a visit. I am Candlesmoke, and there is much I can do for you. Oh, so much._";
	text5 = "Candlesmoke chats with you about nothing of importance. She constantly offers you delicious beverages and rich, hot stew, all offered for free.";
	action = INTRO;
	code =
		set_dialogue_pic(850); //
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(60,11) == 0;
	question = "_Not a great location for an inn._";
	text1 = "_True, true. Not much casual foot traffic. Still, we expect customers. The goods we sell here are unlike any other._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(60,11) == 0;
	question = "_I am [P] [N] of Haven._";
	text1 = "_Ah, yes._ She shows no sign of recognizing the name. _I have heard of Haven, I think. Some sort of Empire, yes? Well, I promise that our goods are worthy of royalty._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(60,11) == 0;
	question = "_What is this place?_";
	text1 = "_A refuge. An inn. A place to trade. To learn. Perhaps even to take a moment to dream. I look forward to showing you what we offer._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(97,0) > 0 && gf(97,0) < 6;
	question = "_I met your kind on Sacramentum. I made a deal with you._";
	text1 = "_Did you? Alas, I have been working here, away from my kind. I don't know about your other dealings. I still have plenty to offer, I am sure._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(97,0) >= 6;
	question = "_I met your kind on Sacramentum. Then I defeated you._";
	text1 = "_Did you?_ She shows no distress. _Alas, I have been working here, away from my kind. I don't know about your other dealings, but I'm sure they were just and reasonable. I have plenty to offer, I am sure._";

begintalknode;
	state = 11;
	nextstate = 10;
	condition = 1;
	question = "_I could use a rest._";
	text1 = "_And we can provide it! We can give places to sleep and recover and let your mind freely wander. Not cheap, but worth the price._";
	text2 = "_We also sell our unique crafts, for those able to provide the materials. I am so excited to help you!_";
	code =
		sf(60,11,1);
	break;
	
begintalknode;
	state = 11;
	nextstate = 10;
	condition = 1;
	question = "_This place stinks of trickery, and I will have none of it._";
	text1 = "_Then you may turn and leave. The Nisse only trade with those who do so freely._";
	text2 = "_Of course, if you change your mind, we can give places to sleep and recover. We also sell our unique crafts, for those able to provide the materials. I so hope you are interested!_";
	code =
		sf(60,11,1);
	break;

begintalknode;
	state = 10;
	nextstate = 12;
	condition = gf(60,11) > 0;
	question = "_I want to learn more about the Nisse._";
	text1 = "_Many do. We are a private people, who live in the deep and hidden parts of the world. We make our way by trading our unique crafts and insights. However, we are no threat._";
	text2 = "_We only want what your kind wants: A peaceful, productive, happy existence._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = gf(97,0) > 0;
	question = "_You pretend to be innocent. I learned otherwise on Sacramentum._";
	text1 = "_Alas, I have never been to Sacramentum. I know nothing of your dealings there. I am but a humble merchant and innkeeper. If you think we owe you a debt, let me pay it with my services._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = gf(97,1) > 0;
	question = "_You took part of my spirit on Sacramentum._";
	text1 = "_Oh, I'm sure you are exaggerating. We are a peaceful people. I doubt that is even possible! I think you will find, in time, your worries are unnecessary._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Where does your kind live?_";
	text1 = "_In unsettled places. Deep, remote, far, high. Alas, as empires expand, they make it harder to find places where we can have privacy. Fortunately, as empires rise, they also fall._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_What do the Nisse want?_";
	text1 = "_Peaceful, productive lives. To trade, to learn, to play, to raise our families. We have trade with outsiders like you, but we mostly want places where we can freely be._";

begintalknode;
	state = 12;
	nextstate = 16;
	condition = 1;
	question = "_Know much about these caves?_";
	text1 = "_Hmmm. Less than you might think. I've been working on constructing this Refuge. I haven't had time to wander. Also, there are monsters._";
	text2 = "_I have heard one interesting thing, though._";

begintalknode;
	state = 16;
	nextstate = 12;
	condition = 1;
	question = "_What do you know?_";
	text1 = "_To the northwest, there is a gateway. It leads to the highest peaks of the Rokaj. Do you know of the Rokaj? It is the nation just above us._";
	text2 = "She chuckles. _A hidden way to the peaks of the Rokaj. Who knows what mischief you could make with that information?_";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_When did you come to the Rokaj?_";
	text1 = "_Oh, I'm not sure. A few weeks ago? Years? Time gets so confusing down here. We came to make this outpost. And here it is, ready to help!_";
	
begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_So this is your only base here?_";
	text1 = "_Currently, yes. As the people here see how much we can offer, I'm sure there will be more._";

begintalknode;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "_This is one of Haven's vassals, and I don't want you here._";
	text1 = "_Ah. I am sorry that you feel that way. However, this is just a remote cave. Forgotten. Of no importance. We have gone to a lot of effort to build this place._";
	text2 = "_We prefer to stay._";

begintalknode;
	state = 14;
	nextstate = 10;
	condition = 1;
	question = "_Never mind. Let's talk about something else._";
	text1 = "_Of course. There are so many ways we can help you._";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_You need to leave, or I will make you leave._";
	text1 = "_Oh. I understand. You have had a difficult journey here, and you are tired. Let me give you time to think. Remember, there is so much we can offer you._";
	text2 = "Then, before you can respond, she vanishes.";
	action = END_TALK;
	code =
		erase_char(6003);
	break;
	
begintalknode;
	state = 13;
	nextstate = 10;
	condition = 1;
	question = "_Let's talk about something else._";
	text1 = "_Of course. There are so many ways we can help you._";

begintalknode;
	state = 10;
	nextstate = 15;
	condition = gf(60,12) == 0 && gf(60,24) == 0 && gf(60,11) > 0;
	question = "_You offered me a place to rest?_";
	text1 = "_Absolutely! It is so difficult to get here. So hard to find a place to sleep free of wandering beasts. We will open a room for you, and you can stay in it as many times as you want._";
	text2 = "_Alas, building this refuge was expensive, so the room will not be cheap. A hundred coins, please._";

begintalknode;
	state = 15;
	nextstate = 10;
	condition = gf(60,20) == 0 && coins_amount() >= 100;
	question = "_I'll take the room._ Pay 100 coins.";
	text1 = "You pay Candlesmoke. The Nisse nods gratefully. _And, little by little, we inch toward profitability. You may use the room._ She points to the north. _First door on the right. Sweet dreams!_";
	code =
		change_coins(-100,1);
		sf(60,20,1);
	break;
	
begintalknode;
	state = 15;
	nextstate = 10;
	condition = gf(60,20) > 0;
	question = "_I'd like that room._";
	text1 = "_It is already open to you. First door on the right._";

begintalknode;
	state = 15;
	nextstate = 10;
	condition = gf(60,20) == 0;
	question = "_No, thank you._";
	text1 = "_All right. Please let me know if you change your mind. It is very clean and comfortable. No fleas!_";

begintalknode;
	state = 10;
	nextstate = 17;
	condition = gf(60,12) == 0 && gf(60,24) > 0;
	question = "_I slept in that room. I had a strange dream._";
	text1 = "_Oh? Really?_ She looks deep into your eyes. _How very interesting. Perhaps you can tell me what it was about?_";

begintalknode;
	state = 17;
	nextstate = 10;
	condition = 1;
	question = "_In my dream, I brought peace to the Ro._";
	text1 = "_What a pleasant dream. We all should be so lucky. This refuge brings clarity to many who stay here._";
	text2 = "_In fact, I suspect there is more that you can learn here. This refuge has more than one room._";
	code =
		award_party_xp(50);
		sf(60,12,1);
	break;
	
begintalknode;
	state = 17;
	nextstate = 10;
	condition = 1;
	question = "_My dream was private._";
	text1 = "_I understand. If it was a happy dream, I hope that it comes true._";
	text2 = "_In fact, I suspect there is more that you can learn here. This refuge has more than one room._";
	code =
		award_party_xp(50);
		sf(60,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = 19;
	condition = gf(60,12) == 1 && gf(60,25) == 0;
	question = "_Is there another room I can stay in?_";
	text1 = "_Indeed! A second room, even cleaner and nicer and more comfortable than the first. Fluffy pillows, luxurious mattress. You may sleep in it as well. Alas, it costs more. Two hundred coins._";
	
begintalknode;
	state = 19;
	nextstate = -1;
	condition = gf(60,21) == 0 && coins_amount() >= 200;
	question = "_I'll take the second room._ Pay 200 coins.";
	text1 = "You pay Candlesmoke. The Nisse grins like a madwoman. _And we are even closer to profitability. You may use the second room._ She points to the north. _Second door on the right. Sweet dreams!_";
	code =
		change_coins(-200,1);
		sf(60,21,1);
	break;
	
begintalknode;
	state = 19;
	nextstate = 10;
	condition = gf(60,21) > 0;
	question = "_I'd like that second room._";
	text1 = "_It is already open to you. Second door on the right._";

begintalknode;
	state = 19;
	nextstate = 10;
	condition = gf(60,21) == 0;
	question = "_I've had enough dreams, thank you._";
	text1 = "_Yes, dreams are a very strong drink. Best not to imbibe too quickly. The room will still be here when you are fully prepared._";
	
begintalknode;
	state = 10;
	nextstate = 30;
	condition = gf(60,12) == 1 && gf(60,25) > 0;
	question = "_I slept in that room. I had a strange dream._";
	text1 = "_Once again? I am glad that our refuge lives up to its name. May I ask what you dreamed about?_";

begintalknode;
	state = 30;
	nextstate = 10;
	condition = 1;
	question = "_In my dream, I restored my family._";
	text1 = "_What a rare vision! So many families are so unhappy. So many never even get a moment of peace and love. I am glad we were able to bring that to you._";
	text2 = "Candlesmoke makes a show of thinking for a time. _You know, this refuge has one final room. Never used. You never know what you might learn there._";
	code =
		award_party_xp(50);
		sf(60,12,2);
	break;
	
begintalknode;
	state = 30;
	nextstate = 10;
	condition = 1;
	question = "_My dreams are all private._";
	text1 = "_I understand. I hope it brought you peace._";
	text2 = "Candlesmoke makes a show of thinking for a time. _You know, this refuge has one final room. Never used. You never know what you might learn there._";
	code =
		award_party_xp(50);
		sf(60,12,2);
	break;

begintalknode;
	state = 10;
	nextstate = 20;
	condition = gf(60,12) == 2 && gf(60,26) == 0;
	question = "_Is there another room I can stay in?_";
	text1 = "_There is. A truly special room. In fact, it has never been used. It is near the heart of this place, where the magic of the Nisse is strongest. Using it would be, I daresay, very interesting._";
	text2 = "_Alas, such magic is not cheap. It will cost five hundred coins. First-time user's discount._";
	
begintalknode;
	state = 20;
	nextstate = 10;
	condition = gf(60,22) == 0 && coins_amount() >= 500;
	question = "_I'll take the final room._ Pay 500 coins.";
	text1 = "You pay Candlesmoke. The Nisse nods solemnly. _You are familiar with the process._ She points to the north. _The door is at the very end of the hall. Good luck._";
	code =
		change_coins(-500,1);
		sf(60,22,1);
	break;
	
begintalknode;
	state = 20;
	nextstate = 10;
	condition = gf(60,22) > 0;
	question = "_I'd like the final room._";
	text1 = "_The door is unlocked. The bed is waiting._";

begintalknode;
	state = 20;
	nextstate = 10;
	condition = gf(60,22) == 0;
	question = "_I decline._";
	text1 = "_I see. Probably for the best. Some are afraid of raw magic. The Nisse do not judge._";
	
begintalknode;
	state = 10;
	nextstate = 22;
	condition = gf(60,12) == 2 && gf(60,26) > 0;
	question = "_I slept in the final room. I had a ... another dream. A long one._";
	text1 = "Candlesmoke looks you in the eye. You feel faint. Probably still groggy from your long sleep. Or is it the smell of flowers?";
	text2 = "_I am glad. Dreams. Visions. Very helpful. Can bring enlightenment. But ... they are fragile. Like webs. Easy to disrupt. Easy to forget._";
		code =
		award_party_xp(50);
		sf(60,12,3);
	break;

		
begintalknode;
	state = 22;
	nextstate = 23;
	condition = 1;
	question = "_What do you mean?_";
	text1 = "_So easy to forget, in the harshness of waking. A long dream. A complex dream. Even more likely to fade. I'm sure it is vanishing even now._";

begintalknode;
	state = 23;
	nextstate = 24;
	condition = 1;
	question = "_Now that you mention it ..._";
	text1 = "_Delicate webs, breaking apart. Leaving the faintest memories, so deep. So deep. Every moment getting weaker. Tell me, [P] of Haven. What was your dream?_";

begintalknode;
	state = 24;
	nextstate = 10;
	condition = 1;
	question = "_I don't remember it._";
	text1 = "_And yet, I'm sure it still has its effect. Leaves its trace._";
	text2 = "She serves you bread and stew. Her mad grin fades a little. _Anything else you need?_";

begintalknode;
	state = 10;
	nextstate = 25;
	condition = gf(60,12) == 3;
	question = "_I want another room to sleep in._";
	text1 = "_But ... you reached the end._";

begintalknode;
	state = 25;
	nextstate = -1;
	condition = 1;
	question = "_The end?_";
	text1 = "_Three rooms. All we had. We have offered you all we have._";
	text2 = "_I hope you find it to be worth it._";

begintalknode;
	state = 10;
	nextstate = 26;
	condition = gf(60,11) > 0;
	question = "_What services do you offer?_";
	text1 = "_We do many things, at many times. We are a magical and versatile people. However, in this small and humble outpost, all we can offer are crafts._";
	text2 = "As she speaks, the smell of the flowers outside enters the inn. You feel strange. Light-headed. Peaceful.";

begintalknode;
	state = 26;
	nextstate = -1;
	condition = gf(97,0) > 0;
	question = "_Can we talk about the deal we made on Sacramentum?_";
	text1 = "_I don't know about the deal. I have never been there._";
	text2 = "It turns out, she doesn't know about the deal and has never been to Sacramentum.";

begintalknode;
	state = 26;
	nextstate = -1;
	condition = gf(97,1) > 0;
	question = "_You took something from me on Sacramentum._";
	text1 = "_I don't know anything about that. I have never been to Sacramentum._";
	text2 = "She doesn't know about that and has never been to Sacramentum.";

begintalknode;
	state = 26;
	nextstate = -1;
	condition = 1;
	question = "_Can you help me with my problems in the Rokaj?_";
	text1 = "_We do not become involved in politics. We are a refuge from your huge, harsh world. We do not take part in it. When we do, it gets us hunted._";

begintalknode;
	state = 26;
	nextstate = 27;
	condition = gf(60,13) == 0 || gf(60,14) == 0 || gf(60,15) == 0 || gf(60,16) == 0 ;
	question = "_What crafts do you sell?_";
	text1 = "_The Rokaj has certain unique crafting materials, very hard to get. I can work them into useful ... things. For a fee._";
	text2 = "_I can teach you a powerful, secret ritual of the Nisse. Truly, a high honor!_";
	text3 = "_I can give you a blessing that makes your attacks strike true._";
	text4 = "_I can give you a blessing that strengthens your mind._";
	text5 = "_I can make a ring, powerfully in tune with the ways of nature._";
	text6 = "_Show me what materials you have found._ You feel dizzy. You show Candlesmoke your crafting goods. _I will also need gold. Gold._";
	code =
		if (gf(60,27) > 0)
			rs(2);
		if (gf(60,14) > 0)
			rs(3);
		if (gf(60,15) > 0)
			rs(4);
		if (gf(60,16) > 0)
			rs(5);
	break;

begintalknode;
	state = 27;
	nextstate = 29;
	condition = 1;
	question = "_Understood._";
	text1 = "_What would you like, that you can afford?_";
	
begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(60,27) == 0 && get_crafting_amt(0) >= 3 && get_crafting_amt(4) >= 3 && coins_amount() >= 300;
	question = "_I would like to learn a Nisse ritual._ Give 300 coins, 3 flawless crystals, and 3 clarity brew.";
	text1 = "You hand over the price. Candlesmoke places everything behind the counter. The smell of pollen grows strong. You get a meal. You get a drink. Things get fuzzy.";
	text2 = "And then you return to yourself. There is a scroll in your hands. You read it. Knowledge enters your mind. The parchment crumbles.";
	text3 = "Candlesmoke smiles. _I hope you find it useful._";
	text4 = "(You can now train the spell Bonds of the Fae.)";
	code =
		sf(96,5,1);
		sf(60,27,1);
		change_coins(-300,1);
		change_crafting(-3,0,0,0,-3);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(60,14) == 0 && get_crafting_amt(1) >= 3 && get_crafting_amt(3) >= 3 && coins_amount() >= 300;
	question = "_I would like a sword blessing._ Give 300 coins, 3 relevant lore, and 3 deep metal.";
	text1 = "You hand over the price. Candlesmoke places everything behind the counter. The smell of pollen grows strong. You get a meal. You get a drink. Things get fuzzy.";
	text2 = "And then you return to yourself. You feel a warm sensation in your chest.";
	text3 = "Candlesmoke smiles. _I hope you find our blessing useful._";
	code =
		sf(60,14,1);
		change_coins(-300,1);
		change_crafting(0,-3,0,-3,0);
		set_spec_item(39,1);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(60,15) == 0 && get_crafting_amt(2) >= 3 && get_crafting_amt(4) >= 2 && coins_amount() >= 300;
	question = "_I would like a heart blessing._ Give 300 coins, 3 ancient amber, and 2 clarity brew.";
	text1 = "You hand over the price. Candlesmoke places everything behind the counter. The smell of pollen grows strong. You get a meal. You get a drink. Things get fuzzy.";
	text2 = "And then you return to yourself. You feel a warm sensation in your chest.";
	text3 = "Candlesmoke smiles. _I hope you find our blessing useful._";
	code =
		sf(60,15,1);
		change_coins(-300,1);
		change_crafting(0,0,-3,0,-2);
		set_spec_item(40,1);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(60,16) == 0 && get_crafting_amt(2) >= 3 && get_crafting_amt(1) >= 2 && coins_amount() >= 300;
	question = "_I would like a powerful enchanted ring._ Give 300 coins, 3 ancient amber, and 2 relevant lore.";
	text1 = "You hand over the price. Candlesmoke places everything behind the counter. The smell of pollen grows strong. You get a meal. You get a drink. Things get fuzzy.";
	text2 = "And then you return to yourself. There is a ring in your hands.";
	text3 = "Candlesmoke smiles. _I hope you find it useful._";
	code =
		sf(60,16,1);
		change_coins(-300,1);
		change_crafting(0,-2,-3,0,0);
		reward_give(526);
	break;
	
begintalknode;
	state = 29;
	nextstate = 10;
	condition = 1;
	question = "_I don't need to trade right now._";
	text1 = "_All right._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(60,11) > 0;
	question = "_I don't need anything else._";
	text1 = "_Then we thank you for your visit._ You are offered a generous meal before you depart. Candlesmoke is generous.";
	action = END_TALK;
	

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "As you walk away from the bed, you feel dizzy. You had a dream. A truly intense one. You struggle to remember it.";
	text2 = "And then it comes back to you. So intense that you feel like you're inside it.";
	text3 = "You are on a hill.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "A hill?";
	text1 = "A hill of the Rokaj. You recognize the Low Dhaga. A hill littered with broken weapons and splattered with blood.";
	text2 = "There are warriors of the Ro watching you. Rebels. Blades drawn. Waiting.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "In the Rokaj?";
	text1 = "Yes. The Low Dhaga. You are sure. A hill littered with broken weapons and splattered with blood.";
	text2 = "There are warriors of the Ro watching you. Rebels. Blades drawn. Waiting.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Fight them.";
	text1 = "You raise your weapon. They raise theirs. Yet, they hesitate. They are not here to fight. The war has been fierce. They question it.";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "Calm them.";
	text1 = "You raise your hands and begin to speak. It is so rare that these wild warriors are willing to listen. You stand on the hill and try to talk them out of their madness.";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "My father is here.";
	text1 = "Yes. Darmal is there. You barely recognize him. He is so old, but he still has the bearing you remember. The dignity. The courage. His presence gives you courage. It reminds you that this is your home too.";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "My mother is here.";
	text1 = "Yes. Mother came back to her beloved, broken Rokaj at last. Tired and sick, but upright and present. She stands behind you, letting you speak. Adding her gravitas to your words.";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "My brother and sister are here.";
	text1 = "Yes. Delia is there, wise and comforting. Sutter is there, brave and unafraid. At last, they are fully behind you. They stand to either side, making it clear to all that Haven is united.";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "I stand alone.";
	text1 = "Yes. Your family sent you out to learn to lead. It is right that you are here alone. Now all will see what you are capable of.";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "I am ready to fight.";
	text1 = "Of course you are. You have fought. Now you don't have to anymore. You have won.";

begintalknode;
	state = 43;
	nextstate = 44;
	condition = 1;
	question = "I talked to the angry Ro.";
	text1 = "You give a speech. At last, you understand them. The right words come effortlessly. You make them see that their path is madness.";
	text2 = "They lower their blades.";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "I am victorious.";
	text1 = "The rebellion ends. All know that [N] is the hero of the day, a full and proper [P] of Haven. Then ... then ...";
	text2 = "You are standing in a bedroom deep underground. Already, memories of the dream are starting to fade.";
	action = END_TALK;

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "Now I can return home.";
	text1 = "The rebellion ends. You can go home. See those you love. Eat proper food, sleep in a proper bed, have a scrap of your old life. You can't wait. Then ... then ...";
	text2 = "You are standing in a bedroom deep underground. Already, memories of the dream are starting to fade.";
	action = END_TALK;

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "Wait. What did I say to them?";
	text1 = "The rebellion ends. All know that [N] is the hero of the day, and you can finally return to the palace for rest, luxury, and a scrap of your old life. Then ... then ...";
	text2 = "You are standing in a bedroom deep underground. Already, memories of the dream are starting to fade.";
	action = END_TALK;
	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "As you walk away from the bed, you feel dizzy. You had a dream. A truly intense one. You struggle to remember it.";
	text2 = "And then it comes back to you. So intense that you feel like you're inside it.";
	text3 = "You have finally returned to Sharyn's Palace. You are just outside the throne room. Now you will walk into the throne room, where your family waits for you.";

begintalknode;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "At last, I am home.";
	text1 = "It is long overdue. Once, you would have been scared. Now, you have won victory, and you know exactly what to say.";

begintalknode;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "My family is just another set of problems.";
	text1 = "Yes, but you are wiser now. You have won victories. You understand them. All the problems can be solved.";

begintalknode;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "Enter the throne room.";
	text1 = "There they are. All three of them. Mother on the throne. Delia and Sutter to either side. They are so, so tired. They are scared. Yet ... don't they know? There is hope.";

begintalknode;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Look at Delia.";
	text1 = "She is exhausted. Lonely. Scared. No matter what challenges are given to her, she is determined to overcome them. To learn everything, convince everyone.";
	text2 = "And each step has a cost.";

begintalknode;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Look at Sutter.";
	text1 = "You see Sutter. The warrior. Sent to one war after another. Fighting, killing, burning, bringing order in the only way he is allowed. He is not given time to rest, only sent to another in an unending line of rebellions.";

begintalknode;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Look at the Queen.";
	text1 = "She is dying. She can't rest. She can only see ways she has failed. She can't forgive herself. She only makes a longer and longer list of wishes, trying to repair the world before the end.";
	text2 = "You can bring her peace.";

begintalknode;
	state = 72;
	nextstate = 73;
	condition = 1;
	question = "Greet them.";
	text1 = "You see them at last. You know what needs to happen. They look up at you, needy, desperate, expectant.";

begintalknode;
	state = 73;
	nextstate = 74;
	condition = 1;
	question = "I have to talk to them.";
	text1 = "Yes. It is time.";

begintalknode;
	state = 73;
	nextstate = 74;
	condition = 1;
	question = "I understand them now.";
	text1 = "Yes. You can bring them hope.";

begintalknode;
	state = 74;
	nextstate = 75;
	condition = 1;
	question = "Talk to them.";
	text1 = "You talk to each of them in turn. Telling them what they need to hear, what they need to do, what needs to change. For them and to Haven.";
	text2 = "They see you in a new light now. You see their respect and their acceptance.";

begintalknode;
	state = 75;
	nextstate = -1;
	condition = 1;
	question = "They are at peace now.";
	text1 = "You are in the Dream Refuge, leaning against the wall. You remember the dream, but it is already starting to fade.";
	text2 = "Your cheeks are wet. You touch them. They are covered with tears.";
	action = END_TALK;

begintalknode;
	state = 75;
	nextstate = -1;
	condition = 1;
	question = "They see my worth. They see how much power I deserve.";
	text1 = "You are in the Dream Refuge, leaning against the wall. You remember the dream, but it is already starting to fade.";
	text2 = "Your cheeks are wet. You touch them. They are covered with tears.";
	action = END_TALK;

begintalknode;
	state = 75;
	nextstate = -1;
	condition = 1;
	question = "Wait. What did I say?";
	text1 = "You are in the Dream Refuge, leaning against the wall. You remember the dream, but it is already starting to fade.";
	text2 = "Your cheeks are wet. You touch them. They are covered with tears.";
	action = END_TALK;
	


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = "As you walk away from the bed, you feel strangely normal. This time, you remember no dreams. You are simply groggy. You wander away from the bed.";
	text2 = "But there is no bed. You aren't in the bedroom anymore. You are in a long, long, shadowy hallway. A shadowy figure stands beside you.";

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "_Who are you?_";
	text1 = "_Not important,_ it says in a soft voice. _Time is short. Come._";
	text2 = "It walks down the hall.";

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "_Where am I?_";
	text1 = "_In the dream,_ it says in a soft voice. _But not a dream. Time is short. Come._";
	text2 = "It walks down the hall.";

begintalknode;
	state = 100;
	nextstate = 101;
	condition = 1;
	question = "Follow.";
	text1 = "You walk down the hall. It seems like a dream, and yet not. It's all so solid. You can't wake up.";
	text2 = "You enter a square chamber, paneled with wood. There is a pedestal in the middle of the room. A crystal globe rests on it. Empty.";
	text3 = "The shade and you stare at it.";
	
begintalknode;
	state = 101;
	nextstate = 102;
	condition = 1;
	question = "_What was in that jar?_";
	text1 = "_A piece of your mother's spirit. She gave it to us in Sacramentum, when she was young._";

begintalknode;
	state = 102;
	nextstate = -1;
	condition = 1;
	question = "_You had a part of my mother's spirit?_";
	text1 = "_For a time. She traded it. She got what she asked for._";

begintalknode;
	state = 102;
	nextstate = -1;
	condition = 1;
	question = "_Where did it go?_";
	text1 = "_It faded. All of her spirit is fading. Piece by piece. Soon, a large portion will be consumed. You will see. It is time._";

begintalknode;
	state = 102;
	nextstate = 103;
	condition = 1;
	question = "_Where are we going?_";
	text1 = "The shade leaves. You follow.";
	text2 = "The hall fades. You see the Rokaj all around you. The coast, the hills, the woods, the mountains. Happy and peaceful. Full of battle. Burning. Alive. Dead.";

begintalknode;
	state = 103;
	nextstate = 104;
	condition = 1;
	question = "_What am I seeing?_";
	text1 = "_So many paths are ahead. You can affect them, you know. There will be war. You can determine how much. Come._";
	text2 = "The shade walks through the land, through the ruins.";

begintalknode;
	state = 104;
	nextstate = 105;
	condition = 1;
	question = "Keep going.";
	text1 = "The dizzying visions of the Ro are thankfully replaced by the hallway. It ends in Candlesmoke's inn. The shade is behind the bar.";
	text2 = "It says, _It is time. You can have a drink. And a wish. The Nisse show their respect to the mighty [P] of mighty Haven. In return for our lives, we offer you ... whatever you want._";

begintalknode;
	state = 105;
	nextstate = -1;
	condition = 1;
	question = "_Did you make this offer to my mother?_";
	text1 = "_Yes. We ask no price, though. You are too dangerous. We offer only a bribe._";

begintalknode;
	state = 105;
	nextstate = -1;
	condition = 1;
	question = "_Who are you?_";
	text1 = "_A wisp of a shadow in a dream._";

begintalknode;
	state = 105;
	nextstate = -1;
	condition = 1;
	question = "Have a drink.";
	text1 = "You eat and drink. It has no flavor.";

begintalknode;
	state = 105;
	nextstate = 106;
	condition = 1;
	question = "_What do you want?_";
	text1 = "_Only to give you a gift. Then you will know that we are more useful alive._";

begintalknode;
	state = 106;
	nextstate = 107;
	condition = 1;
	question = "_There are things I want._";
	text1 = "_Yes. Yes. Here, you can be honest. At last. Forget duty. Forget expectations. Just say what you want._";

begintalknode;
	state = 106;
	nextstate = 107;
	condition = 1;
	question = "_I want nothing from you._";
	text1 = "_Yes you do. We know you have wants. So much pressure and danger. So few chances to escape. Here, you can be honest. At last. Forget duty. Forget expectations. Just say what you want._";

begintalknode;
	state = 107;
	nextstate = 108;
	condition = gf(97,0) == 0 || gf(97,0) >= 6;
	question = "I want ...";
	text1 = "_Yes. You want._";

begintalknode;
	state = 107;
	nextstate = 109;
	condition = gf(97,0) > 0 && gf(97,0) < 6;
	question = "I want ...";
	text1 = "Suddenly, the shade stops you. _No. How did I not see it? The Nisse have already granted you a wish. You will get what you want. I assure it._";
	code =
		//run_game_hardcode(1029);
	break;
	
begintalknode;
	state = 108;
	nextstate = -1;
	condition = 1;
	question = "... mother to be well again.";
	text1 = "_No. The Nisse can do so much, but even we can't conquer death. Ask again._";

begintalknode;
	state = 108;
	nextstate = -1;
	condition = 1;
	question = "... peace in the Rokaj.";
	text1 = "_No. There must be war. It can be great, or it can be small. That will be up to you alone. Ask again._";

begintalknode;
	state = 108;
	nextstate = 109;
	condition = 1;
	question = "... a life of comfort and leisure.";
	text1 = "The Nisse nods. _Such a small thing. So easy to do. That is what you will have. We will make sure of it._";
	code =
		sf(97,7,1);
		//run_game_hardcode(1029);
	break;
	
begintalknode;
	state = 108;
	nextstate = 109;
	condition = 1;
	question = "... a life of power and influence.";
	text1 = "The Nisse nods. _Such a small thing. So easy to do. That is what you will have. We will make sure of it._";
	code =
		sf(97,7,2);
		//run_game_hardcode(1029);
	break;

begintalknode;
	state = 108;
	nextstate = 109;
	condition = 1;
	question = "... to return to the Rokaj and live my life as one of them.";
	text1 = "The Nisse nods. _How amusing. A simple life. How quaint. This is so easy to do. That is what you will have. We will make sure of it._";
	code =
		sf(97,7,3);
		//run_game_hardcode(1029);
	break;

begintalknode;
	state = 108;
	nextstate = 109;
	condition = 1;
	question = "... to gain the crown.";
	text1 = "The moment you say the words, something ... happens. The dream wavers. The shade flickers. The earth groans under your feet.";
	text2 = "The shade says, simply, _Done._";
	code =
		sf(97,7,4);
		//run_game_hardcode(1029);
	break;

begintalknode;
	state = 108;
	nextstate = 109;
	condition = 1;
	question = "... nothing from you.";
	text1 = "A long pause. Dead silence. Icy cold. You feel the rage of the Nisse.";
	text2 = "The shade says, _Then that is what must be._";
	code =
		//run_game_hardcode(1029);
	break;
		
begintalknode;
	state = 109;
	nextstate = -1;
	condition = 1;
	question = "_What has happened?_";
	text1 = "You try to speak, but the dream is already falling apart around you. Vertigo. Panic. Bits of this fake reality vanishing into nothingness.";
	text2 = "And then you are back in the room. Awake. Dizzy. The dream is already fading from your mind.";
	action = END_TALK;

begintalknode;
	state = 109;
	nextstate = -1;
	condition = 1;
	question = "Wake up.";
	text1 = "You concentrate. You try to escape from this strange, alien place. You start to succeed. Vertigo. Panic. Bits of this fake reality vanishing into nothingness.";
	text2 = "And then you are back in the room. Awake. Dizzy. The dream is already fading from your mind.";
	action = END_TALK;
	

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = "In the Nisse private chambers, you find Candlesmoke. She is no longer smiling, and no longer unarmed. She holds a long rapier. Wisps of light float around her. Shielding her.";
	text2 = "_You are not welcome here, Haven. You are intruding. The Nisse demand their privacy._";
	code =
		set_dialogue_pic(850); //
	break;

begintalknode;
	state = 130;
	nextstate = 131;
	condition = 1;
	question = "_I am just looking around._";
	text1 = "_You have looked, and you have seen. Haven is no friend of our kind. We will not permit you to hunt us._";

begintalknode;
	state = 130;
	nextstate = 131;
	condition = 1;
	question = "_I am evicting you._";
	text1 = "_That is what we thought. Haven is no friend of our kind. We will not permit you to hunt us._";

begintalknode;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "_I've changed my mind. I just want to leave._";
	text1 = "_Then you can go, but you can't return._ Your pouch is lighter. The key has vanished.";
	text2 = "_Leave. Your welcome here has ended. The Nisse will not be destroyed by Haven. We go where we will. Leave us, and don't return._ She vanishes.";
	action = END_TALK;
	code =
		set_spec_item(12,-1);
		sf(60,19,0);
		erase_char(30003);
		clear_town(60);
		sf(60,7,1);
	break;
	
begintalknode;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "_You think you are mighty spirits, but Haven sees you as pests._";
	text1 = "_Pests? We are the oldest people. To us, Haven is a blink of an eye. You hunt us, but we will prevail._";
	text2 = "_Now ... Now we will end you forever._";
	action = END_TALK;

begintalknode;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "_You have looked in my mind. You must be destroyed._";
	text1 = "_Yes, we looked into your mind. We saw the greed and the violence. We saw the cruelty of Haven. Hunt us all you want, but we will outlast you._";
	text2 = "_Now ... Now we will end you forever._";
	action = END_TALK;
	
//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				